import logging.handlers, os

logger = logging.getLogger()

logger.setLevel(logging.INFO)

logpath = "../log" + os.sep + "hm.log"
# 设置时间文件处理器
trfh = logging.handlers.TimedRotatingFileHandler(logpath,"s",1,3,"utf-8")

logger.addHandler(trfh)


logging.debug("debug")
logging.info("info")
logging.warning("warning")
logging.error("error")
logging.critical("critical")
